
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        double step = 0.0001;
        double epsilon = 0.0001;
        while(sc.hasNext()){
            double x = sc.nextDouble();
            double a = 0;
            if(x < 0){
                System.out.println(Double.NaN);
            }
            else {
                while(a*a < x && Math.abs(x-a*a) > epsilon){
                    a += step;
                }
                System.out.printf("%.6f\n",a);
            }
        }
    }
}